import request from '@/utils/request'

import Qs from 'qs'
// POST 新增物业接口
export function addEstate(params) {
  return request({
    url: '/estate/add',
    method: 'post',
    data: params,
  })
}

// POST 删除物业接口
export function deleteEstate(params) {
  return request({
    url: '/estate/delete',
    method: 'post',
    data: params,
    // data: Qs.stringify(params)
  })
}

// GET 查询全部物业 GET /estate/findAllEstate
export function findAllEstate(params) {
  return request({
    url: '/estate/findAll',
    method: 'get',
    params: params,
  })
}

// GET 查询物业列
export function findListEstate(params) {
  return request({
    url: '/estate/findList',
    method: 'get',
    params: params,
  })
}

// POST修改物业接口
export function updateEstate(params) {
  return request({
    url: '/estate/update',
    method: 'post',
    data: params,
  })
}

//获取所属机构列表
export function findAllAdmin(params) {
  return request({
    url: '/admin/org/findAll',
    method: 'get',
    params: params,
  })
}
